Follows-up
9d8358e09.
Documented at
https://phpunit.de/manual/4.8/en/appendixes.assertions.html#appendixes.assertions.assertEquals
Change-Id: Id337626c069663883d6a4bde58432637d33eb8c0
$this->assertArrayHasKey( 'wm_infinite_blockBlockID', $cookies );
$expOneDay = wfTimestamp() + ( 24 * 60 * 60 );
// Check for expiry dates in a 10-second window, to account for slow testing.
- $this->assertGreaterThan(
- $expOneDay - 5,
- $cookies['wm_infinite_blockBlockID']['expire']
- );
- $this->assertLessThan(
- $expOneDay + 5,
- $cookies['wm_infinite_blockBlockID']['expire']
+ $this->assertEquals(
+ $expOneDay,
+ $cookies['wm_infinite_blockBlockID']['expire'],
+ 'Expiry date',
+ 5.0
);
// 3. Change the block's expiry (to 2 hours), and the cookie's should be changed also.